<!--
 * @Descripttion: 
 * @Version: 
 * @Author: gaohj
 * @Date: 2022-12-27 15:22:19
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-12-27 15:58:20
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // my_nine();
        // 声明式函数
        function my_nine() {
            document.write("<h1>九九乘法表</h1>");
            document.write("<table border='1' width='800' align='center'>");
            for (var i = 1; i <= 9; i++) {
                document.write("<tr>");
                for (var j = 1; j <= i; j++) {
                    document.write('<td>' + j + "*" + i + "=" + i * j + "&nbsp;&nbsp;</td>");
                }
                document.write("<br>");
                document.write("</tr>");
            }
            document.write("</table>");
        }

        // my_nine();
        // 赋值式函数
        // nine_nine(); //报错
        var nine_nine = function () {
            document.write("<h1>九九乘法表</h1>");
            document.write("<table border='1' width='800' align='center'>");
            for (var i = 1; i <= 9; i++) {
                document.write("<tr>");
                for (var j = 1; j <= i; j++) {
                    document.write('<td>' + j + "*" + i + "=" + i * j + "&nbsp;&nbsp;</td>");
                }
                document.write("<br>");
                document.write("</tr>");
            }
            document.write("</table>");
        }

        // nine_nine();


        // 等腰三角形


        

        
        
    </script>
</body>

</html>